<ion-view title="{{datalist.entity_typename}}(已审批)" class="slide-left-right">
    <ion-content class="ionic-scroll has-header">
        <ion-list>
            <div>
                <ion-item class="item-stable" style="padding:12px" on-tap="toggleGroup(1)"
                          ng-class="{active: isGroupShown(1)}"><i class="icon"
                                                                  ng-class="isGroupShown(1) ? 'ion-chevron-down' : 'ion-chevron-up'"></i>
                    &nbsp; 单据信息
                </ion-item>
                <ion-item class="item-accordion" style="background-color:#f7f7f7" ng-show="!isGroupShown(1)">
                    <div class="bill-title">
                        <div class="row" ng-repeat="z in resultlist2">
                            <div class="col col-33 fix-br">{{z.title}}:</div>
                            <div class="col col-67 fix-br" style="color:#35ccf9">{{z.value}}</div>
                        </div>
                    </div>
                    <div class="bill-content" ng-repeat="x in resultlist.lines">
                        <div class="row" ng-repeat="y in x.entity_info_list">
                            <div class="col col-33 fix-br">{{y.DisplayName}}:</div>
                            <div class="col col-67 fix-br">{{y.Value}}</div>
                        </div>
                    </div>
                </ion-item>
            </div>
            <div>
                <ion-item class="item-stable" style="padding:12px" on-tap="toggleGroup2(2)"
                          ng-class="{active: isGroupShown2(2)}"><i class="icon"
                                                                   ng-class="isGroupShown2(2) ? 'ion-chevron-up' : 'ion-chevron-down'"></i>
                    &nbsp; 审批流程
                </ion-item>
                <ion-item class="item-accordion" style="background-color:#f7f7f7" ng-show="isGroupShown2(2)">
                    <div class="flow-container">
                        <div class="flow-content">
                            <div class="flow-li">
                                <div class="li-hide-header"></div>
                            </div>
                            <div class="flow-li">
                                <div class="li-triangle-detail"></div>
                                <div class="li-circle"></div>
                                <i class="item item-icon-right">发起用户：{{datalist.start_user_name}}<br />发起组织：{{datalist.start_org_name}} <br/>发起日期：{{datalist.start_time}}</i>
                            </div>
                            <div class="flow-li" ng-repeat="x in datalist.approvalinfo_list">
                                <div class="li-triangle-detail"></div>
                                <div class="li-circle"></div>
                                <i class="item item-icon-right">审批用户：{{x.approval_user}} ({{x.process_action}})<br />处理日期：{{x.process_date}} <br />处理意见：{{x.process_opinion?x.process_opinion:'无'}}</i>
                            </div>
                            <div class="flow-li" ng-show="datalist.nextuser">
                                <div class="li-triangle-detail"></div>
                                <div class="li-circle"></div>
                                <i class="item item-icon-right">下一审批人：{{datalist.nextuser}}</i></div>
                            <div class="flow-li" ng-show="!datalist.nextuser">
                                <div class="li-triangle-detail"></div>
                                <div class="li-circle"></div>
                                <i class="item item-icon-right">结 束</i></div>
                            <div class="flow-li">
                                <div class="li-hide-footer"></div>
                            </div>
                        </div>
                        <div class="clear"></div>
                    </div>
                </ion-item>
            </div>
            <div>
                <ion-item class="item-stable" style="padding:12px" on-tap="toggleGroup3(3)"
                          ng-class="{active: isGroupShown3(3)}"><i class="icon"
                                                                   ng-class="isGroupShown3(3) ? 'ion-chevron-up' : 'ion-chevron-down'"></i>
                    &nbsp; 附件查看
                </ion-item>
                <ion-item class="item-accordion" style="background-color:#f7f7f7" ng-show="isGroupShown3(3)">
                    <div class="list download-list"><a class="item item-avatar" on-tap="getAttachFile(x.filehandler,x.filename)"
                                                       ng-switch="x.fileextension"
                                                       ng-repeat="x in datalist.attachmentinfo_list"><img
                            ng-switch-when="docx" src="img/word.png"> <img ng-switch-when="doc" src="img/word.png"> <img
                            ng-switch-when="pptx" src="img/ppt.png"> <img ng-switch-when="ppt" src="img/ppt.png"> <img
                            ng-switch-when="xlsx" src="img/excel.png"> <img ng-switch-when="xls" src="img/excel.png">
                        <img ng-switch-when="txt" src="img/txt.png"> <img ng-switch-when="pdf" src="img/pdf.png"> <img
                                ng-switch-default src="img/default.png">

                        <h2>{{x.filename}}</h2>

                        <p>{{x.filesize}} / 点击下载</p></a></div>
                </ion-item>
            </div>
        </ion-list>
        <ion-infinite-scroll ng-if="!IsBottom" on-infinite="loadMore()" distance="1%"></ion-infinite-scroll>
        <div class="nomoremsg">亲，到底了O(∩_∩)O</div>
    </ion-content>
</ion-view>